import React from 'react';

import styles from './floatbtn.css';


class FloatBtn extends React.Component {
  handleClick = () => {
    if (this.props.clickFunc) {
      this.props.clickFunc();
    }
  };

  render() {
    let {btnStyle} = this.props;
    return (
      <div className={styles["panel-btn"]}
           onClick={this.handleClick}
           style={btnStyle}>
        <div className={styles.icon}>
          {this.props.children}

        </div>
      </div>
    )
  }
}

export default FloatBtn;
